class Array
        def bubble_sort!
          for i in 0...(size - 1)
            for j in 0...(size - i - 1)
              self[j], self[j + 1] = self[j + 1], self[j] if self[j] > self[j + 1]
            end
          end
          self
        end
      end
      
      puts [22, 34, 3, 32, 82, 55, 89, 50, 37, 5, 64, 35, 9, 70].bubble_sort!